<?php

namespace app\tours\model;

use think\model\Relation;

class UserInfo extends Relation {

        protected $link = array(
            'user' => array(
                'mapping_type' => BELONGS_TO,
                'class_name' => 'user',
                'foreign_key' => 'user_id',
                'mapping_fields' => 'username,id',
                'as_fields' => 'username,id',
                'parent_key' => 'id'
            )
        );

}
